#include <iostream>
using namespace std;

bool is_exist_list(int*  intp, int length,int k)
{
    int count=1;
    for(int index =0;index<length-1;index++)
	{
		if(intp[index]+1==intp[index+1]) {count++;if(count>=k) return true;}
		else count=1;
	}
	return false;
}

int main()
{	
    int intp[] = {3,2,1,1,2,2,3,5,7,8,3,1};	
	cout<<"in_exist_list:"<<is_exist_list(intp,12,3)<<endl;
    cout<<"hello"<<endl;
	
}
